#ifndef INCLUDED_PLAYSTATE_H
#define INCLUDED_PLAYSTATE_H

#include "GameState.h"
#include "Map.h"
#include "Guardian.h"
#include "Bullet.h"
#include "Enemy.h"
#include "Boss.h"
#include "Health.h"
#include <Windows.h>

class PlayState :
	public GameState
{
public:
	PlayState(GameContext& gc);
	virtual ~PlayState(void);

	// shit
	void UpdateGameObjects(float deltaTime);
	void FireBullets();
	void SpawnEnemies(float deltaTime);
	void BulletEnemyCollision(float deltaTime);
	void BulletWorldCollision(float deltaTime);
	void GuardianEnemyCollision(float deltaTime);
	void CheckCollision(float deltaTime);
	void LoadSound();
	void UnloadSound();
	void RenderBoundingCircles();

	// load, unload, update, render
	virtual void Load();
	virtual void Unload();
	virtual NextState Update(float deltaTime);
	virtual void Render();

private:
	const int kMaxBullets;
	int bulletIndex;
	const int kMaxEnemies;
	int enemyIndex;;
	const int kMaxExplosions;
	int explosionIndex;
	float collisionDelay;
	int bossHealth;
	bool quit;
	
	Map mMap;
	Guardian mGuardian;
	Enemy* mEnemy;
	Boss mBoss;
	
	SGE_Sprite background;
	Health mGuardianHealth;
	Bullet* bullets;
	SGE_Emitter* explosions;
	SGE_Sound fireSound;
	SGE_Sound explosionSound;
	SGE_Sound impactSound;
	SGE_Sound theme01;
	SGE_Sound theme02;
	SGE_Sound theme03;
	SGE_Sound theme04;
};

#endif